package com.kh.pajx.sop.dao.school.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.kh.pajx.sop.base.BaseDaoImpl;
import com.kh.pajx.sop.dao.school.IBossEcinfoDao;
import com.kh.pajx.sop.domain.BossEcinfo;
/**
 *操作集团客户实现类
 *@author xujiangtao
 *2014年7月2日17:04:01
 */
@Repository
@SuppressWarnings("unchecked")
public class BossEcinfoDaoImpl extends BaseDaoImpl<BossEcinfo> implements IBossEcinfoDao {
	
	// ==>1.IBossEcinfoDao重载方法
	
	
	
	// ==>2.IBaseDao重载方法
	
	@Override
	public List<BossEcinfo> findAll() {
		return getSession().createQuery(//
				"FROM BossEcinfo bi ORDER BY bi.ecName") //
				.list();
	}
	
	
	
	
	
	
	
// =========================以下为需要整理或废弃方法===================================	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

	@Override
	public BossEcinfo getBossEcinfoByEcId(String ecId) {
		List<BossEcinfo> bossEcinfoList =getSession().createQuery("FROM BossEcinfo where ecid=?").setParameter(0, ecId).list();
		if(bossEcinfoList.size()==0){
			return null;
		}else{
			return bossEcinfoList.get(0);
		}
	}
	


}
